#[doc = "Register `SPIRIS` reader"]
pub struct R(crate::R<SPIRIS_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<SPIRIS_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<SPIRIS_SPEC>> for R {
    fn from(reader: crate::R<SPIRIS_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Raw TX FIFO interrupt status.\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXRIS_A {
    #[doc = "0: No interrupt is generated."]
    NO_INTERRUPT = 0,
    #[doc = "1: The interrupt is generated."]
    HAS_INTERRUPT = 1,
}
impl From<TXRIS_A> for bool {
    #[inline(always)]
    fn from(variant: TXRIS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `txris` reader - Raw TX FIFO interrupt status."]
pub struct TXRIS_R(crate::FieldReader<bool, TXRIS_A>);
impl TXRIS_R {
    pub(crate) fn new(bits: bool) -> Self {
        TXRIS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TXRIS_A {
        match self.bits {
            false => TXRIS_A::NO_INTERRUPT,
            true => TXRIS_A::HAS_INTERRUPT,
        }
    }
    #[doc = "Checks if the value of the field is `NO_INTERRUPT`"]
    #[inline(always)]
    pub fn is_no_interrupt(&self) -> bool {
        **self == TXRIS_A::NO_INTERRUPT
    }
    #[doc = "Checks if the value of the field is `HAS_INTERRUPT`"]
    #[inline(always)]
    pub fn is_has_interrupt(&self) -> bool {
        **self == TXRIS_A::HAS_INTERRUPT
    }
}
impl core::ops::Deref for TXRIS_R {
    type Target = crate::FieldReader<bool, TXRIS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Raw RX FIFO interrupt status.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXRIS_A {
    #[doc = "0: No interrupt is generated."]
    NO_INTERRUPT = 0,
    #[doc = "1: The interrupt is generated."]
    HAS_INTERRUPT = 1,
}
impl From<RXRIS_A> for bool {
    #[inline(always)]
    fn from(variant: RXRIS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `rxris` reader - Raw RX FIFO interrupt status."]
pub struct RXRIS_R(crate::FieldReader<bool, RXRIS_A>);
impl RXRIS_R {
    pub(crate) fn new(bits: bool) -> Self {
        RXRIS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> RXRIS_A {
        match self.bits {
            false => RXRIS_A::NO_INTERRUPT,
            true => RXRIS_A::HAS_INTERRUPT,
        }
    }
    #[doc = "Checks if the value of the field is `NO_INTERRUPT`"]
    #[inline(always)]
    pub fn is_no_interrupt(&self) -> bool {
        **self == RXRIS_A::NO_INTERRUPT
    }
    #[doc = "Checks if the value of the field is `HAS_INTERRUPT`"]
    #[inline(always)]
    pub fn is_has_interrupt(&self) -> bool {
        **self == RXRIS_A::HAS_INTERRUPT
    }
}
impl core::ops::Deref for RXRIS_R {
    type Target = crate::FieldReader<bool, RXRIS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Raw RX timeout interrupt status.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RTRIS_A {
    #[doc = "0: No interrupt is generated."]
    NO_INTERRUPT = 0,
    #[doc = "1: The interrupt is generated."]
    HAS_INTERRUPT = 1,
}
impl From<RTRIS_A> for bool {
    #[inline(always)]
    fn from(variant: RTRIS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `rtris` reader - Raw RX timeout interrupt status."]
pub struct RTRIS_R(crate::FieldReader<bool, RTRIS_A>);
impl RTRIS_R {
    pub(crate) fn new(bits: bool) -> Self {
        RTRIS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> RTRIS_A {
        match self.bits {
            false => RTRIS_A::NO_INTERRUPT,
            true => RTRIS_A::HAS_INTERRUPT,
        }
    }
    #[doc = "Checks if the value of the field is `NO_INTERRUPT`"]
    #[inline(always)]
    pub fn is_no_interrupt(&self) -> bool {
        **self == RTRIS_A::NO_INTERRUPT
    }
    #[doc = "Checks if the value of the field is `HAS_INTERRUPT`"]
    #[inline(always)]
    pub fn is_has_interrupt(&self) -> bool {
        **self == RTRIS_A::HAS_INTERRUPT
    }
}
impl core::ops::Deref for RTRIS_R {
    type Target = crate::FieldReader<bool, RTRIS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Raw RX overflow interrupt status.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RORRIS_A {
    #[doc = "0: No interrupt is generated."]
    NO_INTERRUPT = 0,
    #[doc = "1: The interrupt is generated."]
    HAS_INTERRUPT = 1,
}
impl From<RORRIS_A> for bool {
    #[inline(always)]
    fn from(variant: RORRIS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `rorris` reader - Raw RX overflow interrupt status."]
pub struct RORRIS_R(crate::FieldReader<bool, RORRIS_A>);
impl RORRIS_R {
    pub(crate) fn new(bits: bool) -> Self {
        RORRIS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> RORRIS_A {
        match self.bits {
            false => RORRIS_A::NO_INTERRUPT,
            true => RORRIS_A::HAS_INTERRUPT,
        }
    }
    #[doc = "Checks if the value of the field is `NO_INTERRUPT`"]
    #[inline(always)]
    pub fn is_no_interrupt(&self) -> bool {
        **self == RORRIS_A::NO_INTERRUPT
    }
    #[doc = "Checks if the value of the field is `HAS_INTERRUPT`"]
    #[inline(always)]
    pub fn is_has_interrupt(&self) -> bool {
        **self == RORRIS_A::HAS_INTERRUPT
    }
}
impl core::ops::Deref for RORRIS_R {
    type Target = crate::FieldReader<bool, RORRIS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl R {
    #[doc = "Bit 3 - Raw TX FIFO interrupt status."]
    #[inline(always)]
    pub fn txris(&self) -> TXRIS_R {
        TXRIS_R::new(((self.bits >> 3) & 0x01) != 0)
    }
    #[doc = "Bit 2 - Raw RX FIFO interrupt status."]
    #[inline(always)]
    pub fn rxris(&self) -> RXRIS_R {
        RXRIS_R::new(((self.bits >> 2) & 0x01) != 0)
    }
    #[doc = "Bit 1 - Raw RX timeout interrupt status."]
    #[inline(always)]
    pub fn rtris(&self) -> RTRIS_R {
        RTRIS_R::new(((self.bits >> 1) & 0x01) != 0)
    }
    #[doc = "Bit 2 - Raw RX overflow interrupt status."]
    #[inline(always)]
    pub fn rorris(&self) -> RORRIS_R {
        RORRIS_R::new(((self.bits >> 2) & 0x01) != 0)
    }
}
#[doc = "SPIRIS is the raw interrupt status register.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [spiris](index.html) module"]
pub struct SPIRIS_SPEC;
impl crate::RegisterSpec for SPIRIS_SPEC {
    type Ux = u16;
}
#[doc = "`read()` method returns [spiris::R](R) reader structure"]
impl crate::Readable for SPIRIS_SPEC {
    type Reader = R;
}
#[doc = "`reset()` method sets SPIRIS to value 0x08"]
impl crate::Resettable for SPIRIS_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0x08
    }
}
